window.onload = function() {

	var oText1 = document.getElementsByTagName('input')[0];
	var oText2 = document.getElementsByTagName('input')[1];

	tipInput(oText1);
	tipInput(oText2);

	oText1.focus();
};

function tipInput(obj) {

	var tip = obj.value;

	obj.onfocus = function() {

		if(obj.value == tip) {
			obj.value = '';
		}
	};

	obj.onblur = function() {
		if(obj.value === '') {
			obj.value = tip;
		}
	};
}
